{// 加载头部公共文件 }
<include file="Public:header" />
<style>
    #class .nav {
        clear: both;
        margin: 5px auto 0;
        overflow: hidden;
        text-align: left;
        width: 97%;
    }
    #class .nav ul{
        margin-top: 5px;
    }
    #class .nav a {
        border-bottom: 1px dotted #CCCCCC;
        display: inline-block;
        margin: 3px 10px;
        padding: 0 2px;
        text-align: left;
        width: 285px;
    }
    #class .nav a:hover {
        background-position: 60px -196px;
        color: #FF6633;
    }
</style>
<!--主体内容1-->
<div class="grid_16" style="margin-top:20px; margin-bottom:20px">
    <div class="" id="container">
        <div class="mode-a">
            <!-- mode-a-sid -->
            <div class="mode-a-sid">
                <dl id="LastestUpdate" class="box">
                    <dt style="background: url('/App/Modules/Home/Tpl/Public/images/bg-tit-long.png') no-repeat scroll 0 0 transparent;"><span style="font-size:15px;">管理菜单</span></dt>
                    <dd>
                        <ul class="txtList" style="font-size:15px;">
                            <li><img src="../Public/images/ontop8.gif"><a href="__URL__/papers">学习资料</a></li>
                            <li><img src="../Public/images/ontop8.gif"><a href="__URL__/mypapers">过往测试</a></li>
                            <li><img src="../Public/images/ontop8.gif"><a href="__URL__/userinfo">密码修改</a></li>
                            <li><img src="../Public/images/ontop8.gif"><a href="__URL__/signout">退出登录</a></li>
                        </ul>
                    </dd>
                </dl>
                <a href="__URL__/archive"><img src="../Public/images/dl.jpg" width="222px" /></a>
                <a href="__URL__/message"><img src="../Public/images/mes.jpg" width="222px" /></a>
                <a href="__URL__/signin"><img src="../Public/images/members.jpg" width="222px" /></a>
                <!-- end side -->
            </div>
            <!-- mode-a-main -->
            <div class="mode-a-main">
                <div class="articleList">
                    <div class="articleList_content">
                        <ul class="txtList">
                            <dl id="class" class="box">
                                <dt><span style="font-size:18px;">{$title}</span></dt>
                                <dd>
                                <!--<li style="padding-left:20px; font-size: 15px;">{$remark}</li>-->
                                </dd>
                                <dd>
                                    <div class="nav">
                                        <form name="frm" method="post" action="/Index/paperanswer">
                                            <volist name="psysubject" id="p">
                                                <ul>
                                                    <li style="text-align:left;font-size: 15px;"><if condition="$p.type == 1">[单选题]<elseif condition="$p.type == 3" />[是非题]<else />[多选题]</if>&nbsp;{$p.title}</li>
                                                </ul>
                                                <if condition="$p.type == 1">
                                                <a style="font-size:14px;"><input type="radio" value="0" name="answer{$p.id}">{$p['option']['0']}</a>
                                                <a style="font-size:14px;"><input type="radio" value="1" name="answer{$p.id}">{$p['option']['1']}</a>
                                                <a style="font-size:14px;"><input type="radio" value="2" name="answer{$p.id}">{$p['option']['2']}</a>
                                                <a style="font-size:14px;"><input type="radio" value="3" name="answer{$p.id}">{$p['option']['3']}</a>
                                                <elseif condition="$p.type ==3" />
                                                <a style="font-size:14px;"><input type="radio" value="0" id="c0" name="answer{$p.id}">{$p['option']['0']}</a>
                                                <a style="font-size:14px;"><input type="radio" value="1" id="c1" name="answer{$p.id}">{$p['option']['1']}</a>
                                                <else />

                                                <a style="font-size:14px;"><input type="checkbox" value="0" id="c0" name="answer{$p.id}[]">{$p['option']['0']}</a>
                                                <a style="font-size:14px;"><input type="checkbox" value="1" id="c1" name="answer{$p.id}[]">{$p['option']['1']}</a>
                                                <a style="font-size:14px;"><input type="checkbox" value="2" id="c2" name="answer{$p.id}[]">{$p['option']['2']}</a>
                                                <a style="font-size:14px;"><input type="checkbox" value="3" id="c3" name="answer{$p.id}[]">{$p['option']['3']}</a>
                                                </if>
                                            </volist>
                                            <ul>
                                                <li style="margin-left:150px;">
                                                    <input type="hidden" name="id" id="id" value="{$id}" />
                                                    <input type="hidden" name="radio_count" id="radio_count" value="{$radio_count}" />
                                                    <input type="hidden" name="check_count" id="check_count" value="{$check_count}" />
                                                    <!--<input type="submit" id="btn" class="btn" value="提交答案" onclick="return confirm('提交答案前,请再次检查所有测试题是否已经作答,否则将影响到本测试题的测试结果!')" />-->
                                                    <input type="submit" id="btn" class="btn" value="提交答案" onclick="return all_checked()" />
                                                </li>
                                            </ul>
                                        </form>    
                                    </div>
                                </dd>
                            </dl>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="clear"></div>
<!--主体内容1-->
{// 加载底部公共文件 }
<load href="../Public/js/jquery.js" />
<script>
function all_checked(){
	var radioCount = 0;
	$("input[type='radio']").each(function(index,entity){
		if($(entity).attr("checked") == true)
		{
			 radioCount++;
		}
	});
	var radio_bool_count = $("#radio_count").val();
	if(radioCount == radio_bool_count)
		return true;
	else
		alert("还有测试题没有作答,将影响到本测试题的测试结果");
		return false;
	}
</script>
<include file="Public:footer" />
